package com.todo.member.infrastructure.mapper;

import com.todo.member.infrastructure.entity.po.MemberLevelRewardRecordPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/1/21 16:21
 * @description
 */
@Mapper
public interface MemberLevelRewardRecordMapper {
    int insertMemberLevelRewardRecordPO(MemberLevelRewardRecordPO memberLevelRewardRecordPO);

    int updateMemberLevelRewardRecordPOById(MemberLevelRewardRecordPO memberLevelRewardRecordPO);

    Boolean updateMemberLevelRewardRecordStatusById(@Param("id") Long id, @Param("oldStatus") int oldStatus, @Param("newStatus") int newStatus);

    List<MemberLevelRewardRecordPO> queryMemberLevelRewardRecordPOByUser(@Param("userId") Long userId, @Param("levelCode") String levelCode);
}
